#include "../begonia.h"
#include "bustbullet.h"
#include "../base/scene.h"

bustbullet::bustbullet(double tx,double ty,double tr,double tvx,double tvy,bullet *h):bullet(tx,ty,tr,tvx,tvy,h)
    {
    }
void bustbullet::clone(bullet *h)
    {
        bustbullet *a=new bustbullet(x,y,r,vx,vy,h);
        a->c_r=c_r;
        a->c_g=c_g;
        a->c_b=c_b;
    }
bool bustbullet::move()
    {
        if(bullet::move())
        {
            for(bullet *a=f.head.next;a!=&f.head;a=a->next)
                if(a!=this&&sqr(a->r-r)>sqr(a->x-x)+sqr(a->y-y)) {remove();return false;}
            return true;
        }
        return false;
    }
